##########################################################
#            Ladder builder script for blender.          #
##########################################################

ver 1.02 tweaked to function with the new Blender Python API

	minor bugfix: removed condition that caused the script to crash when creating a non URU ladder 1st

Hi folks,

This tool is not quite finished but can be worked with.
As always you dump the .py files in the .blender/scripts directory
The menu will be available under Misc.

In it's current form the script provides 3 types of ladders:

1) Skeleton (doesn't show outside the blender edit windows)
	You can use this as a guideshape when designing your own custom ladder

2) Solid (The basic ladder shape)
	Not much to say about this shape 

3) Test_shape (rungs with (end) diagonals added .. check it out)
	This shape has an extra side option

Interesting/Fun stuff:

You might be wondering why this script still uses the old climberegion method.
The reason is twofold 
	1) I started writing the script b4 the PyPRP climbstuff was rewritten
	2) The old method offers more climbing options
	   e.g. you can remove one of the detection cubes.
	   this leaves you with a ladder that can only be used on one end
	   OR 
	   you copy one (or both of the) detection cube(s) 
	   result: a ladder which is climbable from either side (back/front)
		   or any combination you might like

	Note the detection cubes need to be rotated 180 degrees in the Z axis
	Otherwise the avatar won't be facing the correct way


TODO & Caveats:

Copy:
When you copy an URU type ladder layers 1 and 2 need to be active
I did a quick fix which sets blender to layers 1 and 2 when copying or creating
Blender will return to the previously active layers after the action.....
However this is not always shown properly/immediately

Materials:
To get it to auto-attach the materials make sure the Ladder_Textures directory (and its content ;) is inside the scripts dir.

The script doesn't add the material to the uru properties list 
The copy action changes the Object and Material names 
For now you'll have to manually add it afterwards.

UV mapping:
No UV coordinates available at ladder creation time (do a manual unwrap)
unwrap: select the (mesh)object and press [f], [u], [4] and [f] again

Size:
Ladder widths lower than 2 (blender units) might not place the detection cubes at the optimum position ... this will require some more testing which is tedious.
If someone actually uses ladders with a width lower than 2 pls provide me with the widths and the (approximate) offset required and I'll see if I can fix it.


Greetz Sjaak
